package com.foo.designpattern.facade;

/**
 * com.foo.designpattern.facade
 * Created with IntelliJ IDEA.
 * Created by jiang on 2016/4/19 23:20.
 *
 * @Description 门面角色
 */
public class SecurityFacade {
    private Camera camera;
    private Ring ring;
    private Sensor sensor;

    public SecurityFacade() {
        camera = new Camera();
        ring = new Ring();
        sensor = new Sensor();
    }

    public void active() {
        camera.run();
        ring.run();
        sensor.run();
    }

    public void inactive() {
        camera.stop();
        ring.stop();
        sensor.stop();
    }
}
